let ClassroomApp = new Vue({
    el:"#invitecodeModal",
    data:{
        classrooms:[]
    },
    methods:{
        loadClassroom(){
            axios.get("/portal/classroom/getClassroom")
                .then(result=>{
                    let r = result.data
                    if(r.code == OK){
                        this.classrooms = r.data
                        for(let i = 0;i<this.classrooms.length;i++){
                            let classroom = this.classrooms[i]
                            let createtime = new Date(classroom.createtime).getTime()
                            classroom.endTime = new Date(createtime+31536000000).toLocaleString()


                        }
                    }
                })
        }
    },
    created(){
        this.loadClassroom()
    }

})